package com.yh.correct.dao;

import java.util.List;
import java.util.Map;

import com.yh.correct.model.SysPermission;
import com.yh.correct.model.vo.Tree;

/**
 * 系统权限dao层接口
 * @author Administrator
 *
 */
public interface ISysPermissionMapper {
	
	/**
	 * 获取单个权限
	 * @param permission
	 * @return
	 * @throws Exception
	 */
	SysPermission getSysPermission(SysPermission permission) throws Exception;
	
	/**
	 * 增加权限
	 * @param permission
	 * @return
	 * @throws Exception
	 */
	int insertSysPermission(SysPermission permission) throws Exception;
	
	/**
	 * 删除权限
	 * @param permission
	 * @return
	 * @throws Exception
	 */
	int deleteSysPermission(SysPermission permission) throws Exception;
	
	/**
	 * 更新权限
	 * @param permission
	 * @return
	 * @throws Exception
	 */
	int updateSysPermission(SysPermission permission) throws Exception;
	
	 /**
	  * 动态条件查询权限列表
	 * @param condition
	 * @return
	 * @throws Exception
	 */
	List<SysPermission> findListByCondition(Map<String,Object> condition) throws Exception;
	 /**
	  * 查询权限所有列表(id,name,pid)
	 * @param condition
	 * @return
	 * @throws Exception
	 */
	List<Tree> findTreeList() throws Exception;
	/**
	 * 查询权限所有列表
	 * @return
	 * @throws Exception
	 */
	List<SysPermission> findPermissionAll() throws Exception;
}
